package com.woniuxy.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.woniuxy.controller.form.CreateTopicForm;
import com.woniuxy.controller.form.TopicPageFrom;
import com.woniuxy.controller.form.VoteAnswerFomr;
import com.woniuxy.controller.info.PageTopicInfo;
import com.woniuxy.controller.info.Result;
import com.woniuxy.model.Answer;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.data.domain.Page;

import java.util.concurrent.TimeoutException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Kevin Martin
 * @since 2022-03-19
 */
public interface AnswerService extends IService<Answer> {

    Result<?> creatTopic(CreateTopicForm createTopicForm) throws TimeoutException;

    Result<IPage<PageTopicInfo>> getTopicAndAnswer(TopicPageFrom topicPageFrom);

    Result voteAnswer(VoteAnswerFomr voteAnswerFomr);
}
